package edu.nf.takeoutdemo.mapper;

import com.github.pagehelper.Page;
import edu.nf.takeoutdemo.commons.annotation.AutoFill;
import edu.nf.takeoutdemo.commons.base.BaseMapper;
import edu.nf.takeoutdemo.commons.enumeration.OperationType;
import edu.nf.takeoutdemo.model.dto.EmployeePageQueryDTO;
import edu.nf.takeoutdemo.model.entity.Employee;

/**
 *
 * @author zjl
 * @date 2025/10/23
 */
public interface EmployeeMapper extends BaseMapper<Employee> {
    Employee getByUsername(String username);

    Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);

    @Override
    @AutoFill(value= OperationType.INSERT)
    void add(Employee employee);

    @Override
    @AutoFill(value= OperationType.UPDATE)
    void update(Employee employee);
}
